package com.code.day20;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo05Copy {
    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream = new FileInputStream("D:\\java-code\\java-full-stack\\01-java-base\\src\\com\\code\\day20\\img\\1726621487689.png");
        FileOutputStream fileOutputStream = new FileOutputStream("D:\\java-code\\java-full-stack\\01-java-base\\src\\com\\code\\day20\\刘大胆.jpg");
        byte[] bytes = new byte[1024];
        int len = 0;
        while ((len = fileInputStream.read(bytes)) != -1) {
            fileOutputStream.write(bytes, 0, len);
        }
        fileOutputStream.close();
        fileInputStream.close();

    }
}
